home *** CD-ROM | disk | FTP | other *** search
/ BMUG PD-ROM BV3 / BMUG PD-ROM Version BV3 (CDRM1097900).iso / HyperCard / Games / CirclusMaximus™ / card_5761.txt < prev    next >
Text File  |  1991-03-02  |  3KB  |  125 lines

  1. -- card: 5761 from stack: in
  2. -- bmap block id: 6041
  3. -- flags: 4000
  4. -- background id: 2238
  5. -- name: Segment w/a Base
  6. ----- HyperTalk script -----
  7. on mouseUp
  8.   set numberFormat to <0.000000>
  9.  
  10.   --Calculate Arc AB
  11.   get ((pi*card field "Radius")/180)*card field "Degrees"
  12.   put it into card field "Arc AB"
  13.  
  14.   --Calculate Segment Perimeter
  15.   get cos(card field "Degrees"*(pi/180))
  16.   put it into mem2
  17.   get (sqrt((card field "Radius"^2+card field "Radius"^2) -2*(card field "Radius"*card field "Radius"*mem2)))+ card field "Arc AB"
  18.   put it into card field "Segment Perimeter"
  19.  
  20.   --Calculate SIDE C
  21.   get (sqrt((card field "Radius"^2+card field "Radius"^2) -2*(card field "Radius"*card field "Radius"*mem2)))
  22.   put it into mem13
  23.  
  24.   --Calculate Triangular Area
  25.   get (card field "Radius"+card field "Radius"+mem13)/2
  26.   put it into mem10
  27.   get sqrt(mem10*(mem10-card field "Radius")*(mem10-card field "Radius") *(mem10-mem13))
  28.   put it into mem20
  29.  
  30.   --Calculate Segment Area
  31.   get ((card field "Arc AB"*Card field "Radius")/2)-mem20
  32.   put it into card field "Segment Area"
  33. end mouseUp
  34.  
  35.  
  36. -- part 1 (field)
  37. -- low flags: 00
  38. -- high flags: 0002
  39. -- rect: left=312 top=96 right=114 bottom=459
  40. -- title width / last selected line: 0
  41. -- icon id / first selected line: 0 / 0
  42. -- text alignment: 1
  43. -- font id: 3
  44. -- text size: 12
  45. -- style flags: 0
  46. -- line height: 16
  47. -- part name: Radius
  48.  
  49.  
  50. -- part 3 (field)
  51. -- low flags: 00
  52. -- high flags: 0002
  53. -- rect: left=312 top=119 right=137 bottom=444
  54. -- title width / last selected line: 0
  55. -- icon id / first selected line: 0 / 0
  56. -- text alignment: 1
  57. -- font id: 3
  58. -- text size: 12
  59. -- style flags: 0
  60. -- line height: 16
  61. -- part name: Degrees
  62.  
  63.  
  64. -- part 4 (field)
  65. -- low flags: 01
  66. -- high flags: 0004
  67. -- rect: left=305 top=184 right=203 bottom=452
  68. -- title width / last selected line: 0
  69. -- icon id / first selected line: 0 / 0
  70. -- text alignment: 1
  71. -- font id: 0
  72. -- text size: 12
  73. -- style flags: 0
  74. -- line height: 16
  75. -- part name: Arc AB
  76.  
  77.  
  78. -- part 5 (field)
  79. -- low flags: 01
  80. -- high flags: 0004
  81. -- rect: left=305 top=219 right=238 bottom=452
  82. -- title width / last selected line: 0
  83. -- icon id / first selected line: 0 / 0
  84. -- text alignment: 1
  85. -- font id: 0
  86. -- text size: 12
  87. -- style flags: 0
  88. -- line height: 16
  89. -- part name: Segment Perimeter
  90.  
  91.  
  92. -- part 6 (field)
  93. -- low flags: 01
  94. -- high flags: 0004
  95. -- rect: left=305 top=254 right=273 bottom=452
  96. -- title width / last selected line: 0
  97. -- icon id / first selected line: 0 / 0
  98. -- text alignment: 1
  99. -- font id: 0
  100. -- text size: 12
  101. -- style flags: 0
  102. -- line height: 16
  103. -- part name: Segment Area
  104.  
  105.  
  106. -- part contents for card part 1
  107. ----- text -----
  108. .5
  109.  
  110. -- part contents for card part 3
  111. ----- text -----
  112. 90.000000
  113.  
  114.  
  115. -- part contents for card part 4
  116. ----- text -----
  117. 0.785398
  118.  
  119. -- part contents for card part 5
  120. ----- text -----
  121. 1.492505
  122.  
  123. -- part contents for card part 6
  124. ----- text -----
  125. 0.071350